#pragma once

#include "xwpch.h"

struct WindowProps
{
	std::string Title;
	unsigned int Width;
	unsigned int Height;

	WindowProps(const std::string& title = "OpenGL Work",
		unsigned int width = 1200,
		unsigned int height = 900)
		: Title(title), Width(width), Height(height)
	{
	}
};

class Window
{
public:
	using EventCallbackFn = std::function<void(int)>;
	using MouseCallbackFn = std::function<void(int, int)>;

	virtual ~Window() {};

	virtual void Init(const WindowProps& props) = 0;

	virtual void OnUpdate() = 0;

	virtual void SetEventCallback(const EventCallbackFn& callback) = 0;
	virtual void SetMouseCallback(const MouseCallbackFn& callback) = 0;

	virtual void Shutdown() = 0;

	virtual void* GetWindow() = 0;

	virtual void SetVSync(bool enabled) = 0;

	virtual unsigned int GetWidth() const = 0;
	virtual unsigned int GetHeight() const = 0;

	static Window* Create(const WindowProps& props = WindowProps());

};